3.86 \(\int (d+e x)^2 (a+b \log (c x^n))^2 \, dx\)

Optimal. Leaf size=173 \[ -\frac{2 b d^3 n \log (x) \left (a+b \log \left (c x^n\right )\right )}{3 e}-2 b d^2 n x \left (a+b \log \left (c x^n\right )\right )-b d e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{2}{9} b e^2 n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{b^2 d^3 n^2 \log ^2(x)}{3 e}+2 b^2 d^2 n^2 x+\frac{1}{2} b^2 d e n^2 x^2+\frac{2}{27} b^2 e^2 n^2 x^3 \]

[Out]

2*b^2*d^2*n^2*x + (b^2*d*e*n^2*x^2)/2 + (2*b^2*e^2*n^2*x^3)/27 + (b^2*d^3*n^2*Log[x]^2)/(3*e) - 2*b*d^2*n*x*(a
 + b*Log[c*x^n]) - b*d*e*n*x^2*(a + b*Log[c*x^n]) - (2*b*e^2*n*x^3*(a + b*Log[c*x^n]))/9 - (2*b*d^3*n*Log[x]*(
a + b*Log[c*x^n]))/(3*e) + ((d + e*x)^3*(a + b*Log[c*x^n])^2)/(3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.126524, antiderivative size = 141, normalized size of antiderivative = 0.82, number of steps used = 5, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2319, 43, 2334, 2301} \[ -\frac{b n \left (18 d^2 e x+6 d^3 \log (x)+9 d e^2 x^2+2 e^3 x^3\right ) \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}+\frac{b^2 d^3 n^2 \log ^2(x)}{3 e}+2 b^2 d^2 n^2 x+\frac{1}{2} b^2 d e n^2 x^2+\frac{2}{27} b^2 e^2 n^2 x^3 \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*(a + b*Log[c*x^n])^2,x]

[Out]

2*b^2*d^2*n^2*x + (b^2*d*e*n^2*x^2)/2 + (2*b^2*e^2*n^2*x^3)/27 + (b^2*d^3*n^2*Log[x]^2)/(3*e) - (b*n*(18*d^2*e
*x + 9*d*e^2*x^2 + 2*e^3*x^3 + 6*d^3*Log[x])*(a + b*Log[c*x^n]))/(9*e) + ((d + e*x)^3*(a + b*Log[c*x^n])^2)/(3
*e)

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rubi steps

\begin{align*} \int (d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{(2 b n) \int \frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx}{3 e}\\ &=-\frac{b n \left (18 d^2 e x+9 d e^2 x^2+2 e^3 x^3+6 d^3 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}+\frac{\left (2 b^2 n^2\right ) \int \left (\frac{1}{6} e \left (18 d^2+9 d e x+2 e^2 x^2\right )+\frac{d^3 \log (x)}{x}\right ) \, dx}{3 e}\\ &=-\frac{b n \left (18 d^2 e x+9 d e^2 x^2+2 e^3 x^3+6 d^3 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}+\frac{1}{9} \left (b^2 n^2\right ) \int \left (18 d^2+9 d e x+2 e^2 x^2\right ) \, dx+\frac{\left (2 b^2 d^3 n^2\right ) \int \frac{\log (x)}{x} \, dx}{3 e}\\ &=2 b^2 d^2 n^2 x+\frac{1}{2} b^2 d e n^2 x^2+\frac{2}{27} b^2 e^2 n^2 x^3+\frac{b^2 d^3 n^2 \log ^2(x)}{3 e}-\frac{b n \left (18 d^2 e x+9 d e^2 x^2+2 e^3 x^3+6 d^3 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{(d+e x)^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}\\ \end{align*}

Mathematica [A]  time = 0.0693212, size = 135, normalized size = 0.78 \[ d^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 b d^2 n x \left (a+b \log \left (c x^n\right )-b n\right )+d e x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{1}{2} b d e n x^2 \left (-2 a-2 b \log \left (c x^n\right )+b n\right )+\frac{1}{3} e^2 x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac{2}{27} b e^2 n x^3 \left (-3 a-3 b \log \left (c x^n\right )+b n\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*(a + b*Log[c*x^n])^2,x]

[Out]

(2*b*e^2*n*x^3*(-3*a + b*n - 3*b*Log[c*x^n]))/27 + (b*d*e*n*x^2*(-2*a + b*n - 2*b*Log[c*x^n]))/2 + d^2*x*(a +
b*Log[c*x^n])^2 + d*e*x^2*(a + b*Log[c*x^n])^2 + (e^2*x^3*(a + b*Log[c*x^n])^2)/3 - 2*b*d^2*n*x*(a - b*n + b*L
og[c*x^n])

________________________________________________________________________________________

Maple [C]  time = 0.35, size = 2565, normalized size = 14.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))^2,x)

[Out]

a^2*d*e*x^2-I*ln(c)*Pi*b^2*d^2*csgn(I*c*x^n)^3*x-I*Pi*a*b*d^2*csgn(I*c*x^n)^3*x-1/3*I*e^2*ln(c)*Pi*b^2*x^3*csg
n(I*c*x^n)^3+1/9*I*e^2*Pi*b^2*n*x^3*csgn(I*c*x^n)^3-1/3*I*e^2*Pi*a*b*x^3*csgn(I*c*x^n)^3-2/9*b*n*a*e^2*x^3-2*b
*n*a*d^2*x+1/3*a^2*e^2*x^3+a^2*d^2*x-b*n*a*d*e*x^2+I*Pi*a*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2*x+I*ln(c)*Pi*b^2*d
^2*csgn(I*c*x^n)^2*csgn(I*c)*x+I*ln(c)*Pi*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2*x+1/3*I*e^2*ln(c)*Pi*b^2*x^3*csg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)^3*b^2/e*ln(x^n)^2+I*Pi*b^2*d^2*n*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+I*e*
ln(c)*Pi*b^2*d*x^2*csgn(I*c*x^n)^2*csgn(I*c)+I*e*ln(c)*Pi*b^2*d*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+I*e*Pi*a*b*d*x
^2*csgn(I*c*x^n)^2*csgn(I*c)+I*e*Pi*a*b*d*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-I*ln(c)*Pi*b^2*d^2*csgn(I*x^n)*csgn(
I*c*x^n)*csgn(I*c)*x-I*Pi*a*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x-1/3*I*e^2*ln(c)*Pi*b^2*x^3*csgn(I*x^n)
*csgn(I*c*x^n)*csgn(I*c)+1/9*I*e^2*Pi*b^2*n*x^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*e*Pi*b^2*d*n*x^2*csg
n(I*c*x^n)^2*csgn(I*c)-1/3*I*e^2*Pi*a*b*x^3*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I*e*Pi*b^2*d*n*x^2*csgn(I*
x^n)*csgn(I*c*x^n)^2

________________________________________________________________________________________

Maxima [A]  time = 1.16253, size = 317, normalized size = 1.83 \begin{align*} \frac{1}{3} \, b^{2} e^{2} x^{3} \log \left (c x^{n}\right )^{2} - \frac{2}{9} \, a b e^{2} n x^{3} + \frac{2}{3} \, a b e^{2} x^{3} \log \left (c x^{n}\right ) + b^{2} d e x^{2} \log \left (c x^{n}\right )^{2} - a b d e n x^{2} + \frac{1}{3} \, a^{2} e^{2} x^{3} + 2 \, a b d e x^{2} \log \left (c x^{n}\right ) + b^{2} d^{2} x \log \left (c x^{n}\right )^{2} - 2 \, a b d^{2} n x + a^{2} d e x^{2} + 2 \, a b d^{2} x \log \left (c x^{n}\right ) + 2 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} d^{2} + \frac{1}{2} \,{\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} d e + \frac{2}{27} \,{\left (n^{2} x^{3} - 3 \, n x^{3} \log \left (c x^{n}\right )\right )} b^{2} e^{2} + a^{2} d^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

1/3*b^2*e^2*x^3*log(c*x^n)^2 - 2/9*a*b*e^2*n*x^3 + 2/3*a*b*e^2*x^3*log(c*x^n) + b^2*d*e*x^2*log(c*x^n)^2 - a*b
*d*e*n*x^2 + 1/3*a^2*e^2*x^3 + 2*a*b*d*e*x^2*log(c*x^n) + b^2*d^2*x*log(c*x^n)^2 - 2*a*b*d^2*n*x + a^2*d*e*x^2
 + 2*a*b*d^2*x*log(c*x^n) + 2*(n^2*x - n*x*log(c*x^n))*b^2*d^2 + 1/2*(n^2*x^2 - 2*n*x^2*log(c*x^n))*b^2*d*e +
2/27*(n^2*x^3 - 3*n*x^3*log(c*x^n))*b^2*e^2 + a^2*d^2*x

________________________________________________________________________________________

Fricas [B]  time = 1.01099, size = 757, normalized size = 4.38 \begin{align*} \frac{1}{27} \,{\left (2 \, b^{2} e^{2} n^{2} - 6 \, a b e^{2} n + 9 \, a^{2} e^{2}\right )} x^{3} + \frac{1}{2} \,{\left (b^{2} d e n^{2} - 2 \, a b d e n + 2 \, a^{2} d e\right )} x^{2} + \frac{1}{3} \,{\left (b^{2} e^{2} x^{3} + 3 \, b^{2} d e x^{2} + 3 \, b^{2} d^{2} x\right )} \log \left (c\right )^{2} + \frac{1}{3} \,{\left (b^{2} e^{2} n^{2} x^{3} + 3 \, b^{2} d e n^{2} x^{2} + 3 \, b^{2} d^{2} n^{2} x\right )} \log \left (x\right )^{2} +{\left (2 \, b^{2} d^{2} n^{2} - 2 \, a b d^{2} n + a^{2} d^{2}\right )} x - \frac{1}{9} \,{\left (2 \,{\left (b^{2} e^{2} n - 3 \, a b e^{2}\right )} x^{3} + 9 \,{\left (b^{2} d e n - 2 \, a b d e\right )} x^{2} + 18 \,{\left (b^{2} d^{2} n - a b d^{2}\right )} x\right )} \log \left (c\right ) - \frac{1}{9} \,{\left (2 \,{\left (b^{2} e^{2} n^{2} - 3 \, a b e^{2} n\right )} x^{3} + 9 \,{\left (b^{2} d e n^{2} - 2 \, a b d e n\right )} x^{2} + 18 \,{\left (b^{2} d^{2} n^{2} - a b d^{2} n\right )} x - 6 \,{\left (b^{2} e^{2} n x^{3} + 3 \, b^{2} d e n x^{2} + 3 \, b^{2} d^{2} n x\right )} \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

1/27*(2*b^2*e^2*n^2 - 6*a*b*e^2*n + 9*a^2*e^2)*x^3 + 1/2*(b^2*d*e*n^2 - 2*a*b*d*e*n + 2*a^2*d*e)*x^2 + 1/3*(b^
2*e^2*x^3 + 3*b^2*d*e*x^2 + 3*b^2*d^2*x)*log(c)^2 + 1/3*(b^2*e^2*n^2*x^3 + 3*b^2*d*e*n^2*x^2 + 3*b^2*d^2*n^2*x
)*log(x)^2 + (2*b^2*d^2*n^2 - 2*a*b*d^2*n + a^2*d^2)*x - 1/9*(2*(b^2*e^2*n - 3*a*b*e^2)*x^3 + 9*(b^2*d*e*n - 2
*a*b*d*e)*x^2 + 18*(b^2*d^2*n - a*b*d^2)*x)*log(c) - 1/9*(2*(b^2*e^2*n^2 - 3*a*b*e^2*n)*x^3 + 9*(b^2*d*e*n^2 -
 2*a*b*d*e*n)*x^2 + 18*(b^2*d^2*n^2 - a*b*d^2*n)*x - 6*(b^2*e^2*n*x^3 + 3*b^2*d*e*n*x^2 + 3*b^2*d^2*n*x)*log(c
))*log(x)

________________________________________________________________________________________

Sympy [B]  time = 2.52399, size = 478, normalized size = 2.76 \begin{align*} a^{2} d^{2} x + a^{2} d e x^{2} + \frac{a^{2} e^{2} x^{3}}{3} + 2 a b d^{2} n x \log{\left (x \right )} - 2 a b d^{2} n x + 2 a b d^{2} x \log{\left (c \right )} + 2 a b d e n x^{2} \log{\left (x \right )} - a b d e n x^{2} + 2 a b d e x^{2} \log{\left (c \right )} + \frac{2 a b e^{2} n x^{3} \log{\left (x \right )}}{3} - \frac{2 a b e^{2} n x^{3}}{9} + \frac{2 a b e^{2} x^{3} \log{\left (c \right )}}{3} + b^{2} d^{2} n^{2} x \log{\left (x \right )}^{2} - 2 b^{2} d^{2} n^{2} x \log{\left (x \right )} + 2 b^{2} d^{2} n^{2} x + 2 b^{2} d^{2} n x \log{\left (c \right )} \log{\left (x \right )} - 2 b^{2} d^{2} n x \log{\left (c \right )} + b^{2} d^{2} x \log{\left (c \right )}^{2} + b^{2} d e n^{2} x^{2} \log{\left (x \right )}^{2} - b^{2} d e n^{2} x^{2} \log{\left (x \right )} + \frac{b^{2} d e n^{2} x^{2}}{2} + 2 b^{2} d e n x^{2} \log{\left (c \right )} \log{\left (x \right )} - b^{2} d e n x^{2} \log{\left (c \right )} + b^{2} d e x^{2} \log{\left (c \right )}^{2} + \frac{b^{2} e^{2} n^{2} x^{3} \log{\left (x \right )}^{2}}{3} - \frac{2 b^{2} e^{2} n^{2} x^{3} \log{\left (x \right )}}{9} + \frac{2 b^{2} e^{2} n^{2} x^{3}}{27} + \frac{2 b^{2} e^{2} n x^{3} \log{\left (c \right )} \log{\left (x \right )}}{3} - \frac{2 b^{2} e^{2} n x^{3} \log{\left (c \right )}}{9} + \frac{b^{2} e^{2} x^{3} \log{\left (c \right )}^{2}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**2,x)

[Out]

a**2*d**2*x + a**2*d*e*x**2 + a**2*e**2*x**3/3 + 2*a*b*d**2*n*x*log(x) - 2*a*b*d**2*n*x + 2*a*b*d**2*x*log(c)
+ 2*a*b*d*e*n*x**2*log(x) - a*b*d*e*n*x**2 + 2*a*b*d*e*x**2*log(c) + 2*a*b*e**2*n*x**3*log(x)/3 - 2*a*b*e**2*n
*x**3/9 + 2*a*b*e**2*x**3*log(c)/3 + b**2*d**2*n**2*x*log(x)**2 - 2*b**2*d**2*n**2*x*log(x) + 2*b**2*d**2*n**2
*x + 2*b**2*d**2*n*x*log(c)*log(x) - 2*b**2*d**2*n*x*log(c) + b**2*d**2*x*log(c)**2 + b**2*d*e*n**2*x**2*log(x
)**2 - b**2*d*e*n**2*x**2*log(x) + b**2*d*e*n**2*x**2/2 + 2*b**2*d*e*n*x**2*log(c)*log(x) - b**2*d*e*n*x**2*lo
g(c) + b**2*d*e*x**2*log(c)**2 + b**2*e**2*n**2*x**3*log(x)**2/3 - 2*b**2*e**2*n**2*x**3*log(x)/9 + 2*b**2*e**
2*n**2*x**3/27 + 2*b**2*e**2*n*x**3*log(c)*log(x)/3 - 2*b**2*e**2*n*x**3*log(c)/9 + b**2*e**2*x**3*log(c)**2/3

________________________________________________________________________________________

Giac [B]  time = 1.28002, size = 520, normalized size = 3.01 \begin{align*} \frac{1}{3} \, b^{2} n^{2} x^{3} e^{2} \log \left (x\right )^{2} + b^{2} d n^{2} x^{2} e \log \left (x\right )^{2} - \frac{2}{9} \, b^{2} n^{2} x^{3} e^{2} \log \left (x\right ) - b^{2} d n^{2} x^{2} e \log \left (x\right ) + \frac{2}{3} \, b^{2} n x^{3} e^{2} \log \left (c\right ) \log \left (x\right ) + 2 \, b^{2} d n x^{2} e \log \left (c\right ) \log \left (x\right ) + b^{2} d^{2} n^{2} x \log \left (x\right )^{2} + \frac{2}{27} \, b^{2} n^{2} x^{3} e^{2} + \frac{1}{2} \, b^{2} d n^{2} x^{2} e - \frac{2}{9} \, b^{2} n x^{3} e^{2} \log \left (c\right ) - b^{2} d n x^{2} e \log \left (c\right ) + \frac{1}{3} \, b^{2} x^{3} e^{2} \log \left (c\right )^{2} + b^{2} d x^{2} e \log \left (c\right )^{2} - 2 \, b^{2} d^{2} n^{2} x \log \left (x\right ) + \frac{2}{3} \, a b n x^{3} e^{2} \log \left (x\right ) + 2 \, a b d n x^{2} e \log \left (x\right ) + 2 \, b^{2} d^{2} n x \log \left (c\right ) \log \left (x\right ) + 2 \, b^{2} d^{2} n^{2} x - \frac{2}{9} \, a b n x^{3} e^{2} - a b d n x^{2} e - 2 \, b^{2} d^{2} n x \log \left (c\right ) + \frac{2}{3} \, a b x^{3} e^{2} \log \left (c\right ) + 2 \, a b d x^{2} e \log \left (c\right ) + b^{2} d^{2} x \log \left (c\right )^{2} + 2 \, a b d^{2} n x \log \left (x\right ) - 2 \, a b d^{2} n x + \frac{1}{3} \, a^{2} x^{3} e^{2} + a^{2} d x^{2} e + 2 \, a b d^{2} x \log \left (c\right ) + a^{2} d^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

1/3*b^2*n^2*x^3*e^2*log(x)^2 + b^2*d*n^2*x^2*e*log(x)^2 - 2/9*b^2*n^2*x^3*e^2*log(x) - b^2*d*n^2*x^2*e*log(x)
+ 2/3*b^2*n*x^3*e^2*log(c)*log(x) + 2*b^2*d*n*x^2*e*log(c)*log(x) + b^2*d^2*n^2*x*log(x)^2 + 2/27*b^2*n^2*x^3*
e^2 + 1/2*b^2*d*n^2*x^2*e - 2/9*b^2*n*x^3*e^2*log(c) - b^2*d*n*x^2*e*log(c) + 1/3*b^2*x^3*e^2*log(c)^2 + b^2*d
*x^2*e*log(c)^2 - 2*b^2*d^2*n^2*x*log(x) + 2/3*a*b*n*x^3*e^2*log(x) + 2*a*b*d*n*x^2*e*log(x) + 2*b^2*d^2*n*x*l
og(c)*log(x) + 2*b^2*d^2*n^2*x - 2/9*a*b*n*x^3*e^2 - a*b*d*n*x^2*e - 2*b^2*d^2*n*x*log(c) + 2/3*a*b*x^3*e^2*lo
g(c) + 2*a*b*d*x^2*e*log(c) + b^2*d^2*x*log(c)^2 + 2*a*b*d^2*n*x*log(x) - 2*a*b*d^2*n*x + 1/3*a^2*x^3*e^2 + a^
2*d*x^2*e + 2*a*b*d^2*x*log(c) + a^2*d^2*x